Replication files for the paper:
  
"On the Demographic Adjustment of Unemployment," 
The Review of Economics and Statistics
Regis Barnichon, Federal Reserve Bank San Francisco
Geert Mesters, Universitat Pompeu Fabra, Barcelona GSE
 
Programs are also available at: 
https://sites.google.com/site/regisbarnichon/ and http://www.geertmesters.com 
  
 
The demographic adjustment consists of 3 Steps.


1. Adjustement on raw data for worker transition rates:

The raw transition data (stored in FlowData\Flows) are adjusted as outlined in the web-appendix.

In particular, the hazard rates are corrected for the 1994 CPS redesign, for time-aggregation bias (Shimer (2012)) and for margin error (Poterba & Summers (1986)). These procedures are performed by running the 
matlab file:

FlowData\HzdRate.m

The matrix of hazard rates is stored as Hzd.mat

2. Demographic adjustment procedures of section 4 of the paper: 
NB: This section is done using the econometrics software "ox-metrics". 
The code is written for Ox version 7.1 and makes use of the SsfPack package. 

The adjusted hazard rate data (FlowData\HzdRate.m) are then stored (manually copied) in the ox-metrics data-files in the folder Data. 
- JEI_ori.in7   
- JEU_ori.in7   
- JUE_ori.in7   
- JUI_ori.in7   
- JIE_ori.in7   
- JIU_ori.in7   
where each file contains a specific transition. 

The file BaselineModel.ox reads in any of these six panels of hazard rates and returns the 
demographic adjusted panel of hazard rates. These are stored as   

- JEIfactors.in7
- JEUfactors.in7
- JUEfactors.in7
- JUIfactors.in7
- JIEfactors.in7
- JIUfactors.in7

The adjusted hazard rates (for each misclassification scheme) are saved together in 
the folder ImpliedHazardRates. There we also include the original (adjusted in part 1.) 
hazard rates. 

3. This last section builds the counter-factual aggreate UR using the hazard rates adjusted for demographic changes with the DFM 

Run the code Build_Ualt.m

The code will build
-counterfactual aggregate UR using DFM-adjusted hazard rates
-counterfactual aggregate UR using shift-share analysis
-figures 4 to 8 




